import { memo } from "react";
import { Menu} from 'antd';
import { Link } from 'react-router-dom'
import { LogoutOutlined, UserOutlined, SettingOutlined  } from '@ant-design/icons'

const userMenu =  () => {

 const loginout =  () =>{
   sessionStorage.clear()
 }
  
 return (
    <Menu style={{ width: '120px'}}>
    <Menu.Item icon={<UserOutlined />}>
        个人中心
    </Menu.Item>
    <Menu.Item icon={<UserOutlined />}>
        产品文档
    </Menu.Item>
    <Menu.Item icon={<SettingOutlined />}>
         接口文档
    </Menu.Item>
    <Menu.Item icon={<LogoutOutlined />} onClick={() => loginout()}>
    <Link to="/login"> 退出登录</Link>
    </Menu.Item>
  </Menu>
 )
}

export default memo(userMenu);